package com.cw2.behavioral.visitor;

/**
 * 升级包实现接口
 */
public class UpdatePackage implements Vistor{

    private String ext;

    public UpdatePackage(String ext) {
        this.ext = ext;
    }

    @Override
    public void visitCPU(CPU cpu) {
        cpu.command += " >>> " + ext;
    }

    @Override
    public void visitDisk(Disk disk) {
        disk.command += " >>> " + ext;
    }
}
